<%--
  Created by IntelliJ IDEA.
  User: wzm
  Date: 2023/3/13
  Time: 10:09
  To change this template use File | Settings | File Templates.
--%>

<%@ page contentType="text/html;charset=UTF-8" language="java" isELIgnored="false" %>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<html>
<head>
	<title>Title</title>
</head>
<body>
<center>

<h1>修改信息</h1>
	<form action="${pageContext.request.contextPath}/updateById" method="post">
		<%--修改 根据id来修改--%>
		<input type="hidden" name="id" value="${emp.id}">

		用户名: <input type="text" name="username" value="${emp.username}"> <br>
		密码:<input type="password" name="password" value="${emp.password}"> <br>
		年龄:<input type="number" name="age" value="${emp.age}"> <br>
		电话: <input type="text" name="phone" value="${emp.phone}">  <br>
		状态:
		<c:if test="${emp.status == 1}">
		<input type="radio" name="status" value="1" checked>启用
		<input type="radio" name="status" value="0">禁用 <br>
		</c:if>

		<c:if test="${emp.status == 0}">
			<input type="radio" name="status" value="1">启用
			<input type="radio" name="status" value="0" checked>禁用 <br>
		</c:if>

		<input type="submit" value="修改">
		<input type="reset" value="重置">

	</form>
</center>

</body>
</html>
